.class Lorg/apache/cordova/WqCordovaActivity$6;
.super Ljava/lang/Thread;


# instance fields
.field final synthetic this$0:Lorg/apache/cordova/WqCordovaActivity;

.field final synthetic val$description:Ljava/lang/String;

.field final synthetic val$flag:I

.field final synthetic val$imagePath:Ljava/lang/String;

.field final synthetic val$title:Ljava/lang/String;

.field final synthetic val$url:Ljava/lang/String;


# direct methods
.method constructor <init>(Lorg/apache/cordova/WqCordovaActivity;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V
    .locals 0

    iput-object p1, p0, Lorg/apache/cordova/WqCordovaActivity$6;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    iput-object p2, p0, Lorg/apache/cordova/WqCordovaActivity$6;->val$url:Ljava/lang/String;

    iput-object p3, p0, Lorg/apache/cordova/WqCordovaActivity$6;->val$title:Ljava/lang/String;

    iput-object p4, p0, Lorg/apache/cordova/WqCordovaActivity$6;->val$description:Ljava/lang/String;

    iput-object p5, p0, Lorg/apache/cordova/WqCordovaActivity$6;->val$imagePath:Ljava/lang/String;

    iput p6, p0, Lorg/apache/cordova/WqCordovaActivity$6;->val$flag:I

    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 6

    invoke-super {p0}, Ljava/lang/Thread;->run()V

    :try_start_0
    new-instance v0, Lcom/tencent/mm/sdk/openapi/WXWebpageObject;

    iget-object v1, p0, Lorg/apache/cordova/WqCordovaActivity$6;->val$url:Ljava/lang/String;

    invoke-direct {v0, v1}, Lcom/tencent/mm/sdk/openapi/WXWebpageObject;-><init>(Ljava/lang/String;)V

    new-instance v1, Lcom/tencent/mm/sdk/openapi/WXMediaMessage;

    invoke-direct {v1, v0}, Lcom/tencent/mm/sdk/openapi/WXMediaMessage;-><init>(Lcom/tencent/mm/sdk/openapi/WXMediaMessage$IMediaObject;)V

    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$6;->val$title:Ljava/lang/String;

    iput-object v0, v1, Lcom/tencent/mm/sdk/openapi/WXMediaMessage;->title:Ljava/lang/String;

    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$6;->val$description:Ljava/lang/String;

    iput-object v0, v1, Lcom/tencent/mm/sdk/openapi/WXMediaMessage;->description:Ljava/lang/String;

    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$6;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    invoke-static {v0}, Lcom/fiberhome/gaea/client/d/f;->a(Landroid/content/Context;)Lcom/fiberhome/gaea/client/d/f;

    move-result-object v0

    iget-object v2, p0, Lorg/apache/cordova/WqCordovaActivity$6;->val$imagePath:Ljava/lang/String;

    invoke-virtual {v0, v2}, Lcom/fiberhome/gaea/client/d/f;->b(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;

    move-result-object v0

    invoke-virtual {v0}, Lcom/squareup/picasso/RequestCreator;->get()Landroid/graphics/Bitmap;

    move-result-object v0

    const/4 v2, 0x1

    invoke-static {v0, v2}, Lorg/apache/cordova/util/Util;->bmpToByteArray(Landroid/graphics/Bitmap;Z)[B

    move-result-object v0

    iput-object v0, v1, Lcom/tencent/mm/sdk/openapi/WXMediaMessage;->thumbData:[B

    new-instance v0, Lcom/tencent/mm/sdk/openapi/SendMessageToWX$Req;

    invoke-direct {v0}, Lcom/tencent/mm/sdk/openapi/SendMessageToWX$Req;-><init>()V

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v3, "weburl"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    invoke-virtual {v2, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    iput-object v2, v0, Lcom/tencent/mm/sdk/openapi/SendMessageToWX$Req;->transaction:Ljava/lang/String;

    iput-object v1, v0, Lcom/tencent/mm/sdk/openapi/SendMessageToWX$Req;->message:Lcom/tencent/mm/sdk/openapi/WXMediaMessage;

    iget v1, p0, Lorg/apache/cordova/WqCordovaActivity$6;->val$flag:I

    iput v1, v0, Lcom/tencent/mm/sdk/openapi/SendMessageToWX$Req;->scene:I

    iget-object v1, p0, Lorg/apache/cordova/WqCordovaActivity$6;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    # getter for: Lorg/apache/cordova/WqCordovaActivity;->api:Lcom/tencent/mm/sdk/openapi/IWXAPI;
    invoke-static {v1}, Lorg/apache/cordova/WqCordovaActivity;->access$1000(Lorg/apache/cordova/WqCordovaActivity;)Lcom/tencent/mm/sdk/openapi/IWXAPI;

    move-result-object v1

    invoke-interface {v1, v0}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->sendReq(Lcom/tencent/mm/sdk/openapi/BaseReq;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$6;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    new-instance v1, Lorg/apache/cordova/WqCordovaActivity$6$1;

    invoke-direct {v1, p0}, Lorg/apache/cordova/WqCordovaActivity$6$1;-><init>(Lorg/apache/cordova/WqCordovaActivity$6;)V

    invoke-virtual {v0, v1}, Lorg/apache/cordova/WqCordovaActivity;->runOnUiThread(Ljava/lang/Runnable;)V

    goto :goto_0
.end method
